package view

import (
	"context"
	"github.com/sirupsen/logrus"
	"miao-wails/backed/app/service"
	"miao-wails/backed/structs/idp"
)

type IdpView struct {
	ctx context.Context
}

func NewIdpView() *IdpView {
	return &IdpView{}
}

func (a IdpView) GetPcBaseInfo() (out idp.PcBaseInfo, err error) {
	if out, err = service.IdpServ.GetPcBaseInfo(); err != nil {
		logrus.Errorf("GetPcBaseInfo err:[%s]", err)
		return
	}
	return
}

func (a IdpView) GetConfig() (out idp.Config, err error) {
	if out, err = service.IdpServ.GetConfig(); err != nil {
		logrus.Errorf("GetConfig err:[%s]", err)
		return
	}
	return
}
